#include "StdAfx.h"
#include "IStreamInput.h"
#include "Element.h"
#include "IOManager.h"
#include "SchemaInterpreter.h"
IStreamInput::IStreamInput(boost::shared_ptr<JsonSchema>jsonSchema)
{
	this->jsonSchema = jsonSchema;
	this->id = jsonSchema->getId();
}


IStreamInput::~IStreamInput(void)
{
}
std::string IStreamInput::getId(void)
{
	return this->id;
}
bool IStreamInput::getAndCheckNextElement(Element& element)
{
	getNextElement(element);
	return SchemaInterpreter::checkDocumentSatisfiedSchema(element.document,this->jsonSchema);
}